package com.good.entity;

import java.io.Serializable;

import javax.persistence.Embeddable;

@Embeddable
public class EmbeddableDemo implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer in1;
	private Integer in2;

	public Integer getIn2() {
		return in2;
	}

	public void setIn2(Integer in2) {
		this.in2 = in2;
	}

	@SuppressWarnings("unused")
	@Override
	public boolean equals(Object obj) {
		if (obj == this) {
			return true;
		}
		if (!(obj instanceof EmbeddableDemo)) {
			return false;
		}
		if (obj == null) {
			return false;
		}
		EmbeddableDemo pk = (EmbeddableDemo) obj;
		return pk.in1 == in1 && pk.in1.equals(in1);
	}

	@Override
	public int hashCode() {
		return (int) in1.hashCode() + in2;
	}

	public Integer getIn1() {
		return in1;
	}

	public void setIn1(Integer in1) {
		this.in1 = in1;
	}
}
